<template>
    <a-form-model layout="inline" :model="formInline" @submit="handleSubmit" @submit.native.prevent>
      <a-form-model-item>
        <a-input v-model="formInline.user" placeholder="账号">
          <a-icon slot="prefix" type="user" style="color:rgba(0,0,0,.25)" />
        </a-input>
      </a-form-model-item>
      <a-form-model-item>
        <a-input v-model="formInline.password" type="password" placeholder="密码">
          <a-icon slot="prefix" type="lock" style="color:rgba(0,0,0,.25)" />
        </a-input>
      </a-form-model-item>
      <a-form-model-item>
        <a-button
          type="primary"
          html-type="submit"
          :disabled="formInline.user === '' || formInline.password === ''"
        >
          登录
        </a-button>
      </a-form-model-item>
    </a-form-model>
  </template>
  <script>
  export default {
    data() {
      return {
        formInline: {
          user: '',
          password: '',
        },
      };
    },
    methods: {
      handleSubmit(e) {
        console.log(this.formInline);
      },
    },
  };
  </script>
  